package com.lvmama.rhino.pojo;

import com.fasterxml.jackson.annotation.JsonBackReference;

import java.util.List;

public class StatisticCode{
	
    public StatisticCode(){
        super();
	}
	
	private Integer id;//id
	private String name;//跟踪码名称
	private String enName;//跟踪码名称拼音
	private Integer parentId;//父id
	private String code;//code码
	private String isAdd;//是否允许添加子级code码(1,是;0,否)
	private String codeType;//code码类型
	private String codeTypeLevel;//code码类型级别
	private StatisticCode parent;//父级

    private List<String> pageList;//页面的所有子级
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEnName() {
        return enName;
    }
    public void setEnName(String enName) {
        this.enName = enName;
    }
    public Integer getParentId() {
        return parent != null && parent.getId() != null ? parent.getId() : null;
    }
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getIsAdd() {
        return isAdd;
    }
    public void setIsAdd(String isAdd) {
        this.isAdd = isAdd;
    }
    public String getCodeType() {
        return codeType;
    }
    public void setCodeType(String codeType) {
        this.codeType = codeType;
    }
    public String getCodeTypeLevel() {
        return codeTypeLevel;
    }
    public void setCodeTypeLevel(String codeTypeLevel) {
        this.codeTypeLevel = codeTypeLevel;
    }
    @JsonBackReference
    public StatisticCode getParent() {
        return parent;
    }

    public void setParent(StatisticCode parent) {
        this.parent = parent;
    }


    @Override
    public String toString() {
        return name;
    }

    public List<String> getPageList() {
        return pageList;
    }

    public void setPageList(List<String> pageList) {
        this.pageList = pageList;
    }
}
